package OSdesign.Function_show;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class test {
    public static void main(String[] args){
        int[] track = new int[10];
        Random random = new Random();
        List<Object> list = new ArrayList<>();
        for(int i =0;i<10;i++){
            if(i%8 == 0){
                list.clear();
            }
            while(true){
                int x = random.nextInt(8)+1;
                if(!list.contains(x)){
                    list.add(x);
                    track[i] = (int)list.get(i%8);
                    break;
                }
            }

        }
        for(int i = 0;i <10;i++){
            System.out.println(track[i]);
        }
        System.out.println((0%8));
    }
}
